import fetch from 'common/src/utils/fetch'


/**
 * 删除作息时间
 */
function deleteTimeSchedule(idList) {
    return fetch({
        url: '/api/baseresservice/workTime',
        method: 'delete',
        data: {
            "ids": idList
        }
    });
}

/**
 * 修改作息时间
 */
function updateTimeSchedule(template) {
    return fetch({
        url: '/api/baseresservice/workTime',
        method: 'put',
        data: template
    });
}

/**
 * 新增作息时间
 */
function addTimeSchedule(template) {
    return fetch({
        url: '/api/baseresservice/workTime',
        method: 'post',
        data: template
    });
}

/**
 * 查询作息时间
 */
function searchTimeScheduleList(data) {
    let query = ""
    return fetch({
        url: '/api/baseresservice/workTime/page',
        method: 'get',
        params: data
    });
}
/**
 * 查询作息时间
 */
function getTimeSchedule(id) {
    return fetch({
        url: '/api/baseresservice/workTime/' + id,
        method: 'get'
    });
}

export default {
    "deleteTimeSchedule": deleteTimeSchedule,
    "updateTimeSchedule": updateTimeSchedule,
    "addTimeSchedule": addTimeSchedule,
    "searchTimeScheduleList": searchTimeScheduleList,
    "getTimeSchedule": getTimeSchedule
}